package Test1224;

public class Test07 {
    public static void main(String[] args) {
        // 求出arr中元素的平均值
        int[] arr = {6, 1, 7, 4, 3};
        int sum=0;
        for (int i:arr){
            sum+=i;
        }
        double avg=(double) sum/arr.length;
        System.out.println("平均值为："+avg);
    }
}
